package com.cim.utils;

import java.util.HashMap;
import java.util.Map;

public class ResponseFileContentTypeUtil {
    private static final Map<String,String> map = new HashMap<String, String>();
    private static final String defaultContentType="text/html";
    static{
        map.put("gif","image/gif");
        map.put("jpeg","image/jpeg");
        map.put("png","image/png");
        map.put("jpg","image/jpeg");
    }

    public static String get(String key){
        String value=map.get(key);
        if(value!=null&&!value.equals("")){
            return value;
        }
        return defaultContentType;
    }
}
